package com.siam.package_util.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.siam.package_common.entity.BasicResult;
import com.siam.package_util.entity.Setting;
import com.siam.package_util.entity.internal.Printer;
import com.siam.package_util.model.dto.OrderDetailPrintDto;
import com.siam.package_util.model.dto.OrderPrintDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "util-siam")
public interface PrinterFeignApi {

    @PostMapping(value = "/api/printer/selectByPrimaryKey")
    BasicResult<Printer> selectByPrimaryKey(@RequestParam("id") Integer id);

    /**
     * 打印后厨总单
     * @param orderPrintDto
     * @param orderDetailPrintDtoList
     * @return
     */
    @PostMapping(value = "/api/printer/kitchenTotalOrderPrint")
    BasicResult kitchenTotalOrderPrint(@RequestParam("orderPrintDto") OrderPrintDto orderPrintDto, @RequestParam("orderDetailPrintDtoList") List<OrderDetailPrintDto> orderDetailPrintDtoList, @RequestParam("printerId") Integer printerId);

    /**
     * 打印后厨单商品
     * @param orderPrintDto
     * @param orderDetailPrintDto
     * @return
     */
    @PostMapping(value = "/api/printer/kitchenSingleGoodsOrderPrint")
    BasicResult kitchenSingleGoodsOrderPrint(@RequestParam("orderPrintDto") OrderPrintDto orderPrintDto, @RequestParam("orderDetailPrintDto") OrderDetailPrintDto orderDetailPrintDto, @RequestParam("printerId") Integer printerId);

    /**
     * 结账单打印
     *
     * @param orderPrintDto 订单信息
     * @param orderDetailPrintDtoList  订单商品信息
     */
    @PostMapping(value = "/api/printer/checkoutOrderPrint")
    BasicResult checkoutOrderPrint(@RequestParam("orderPrintDto") OrderPrintDto orderPrintDto, @RequestParam("orderDetailPrintDtoList") List<OrderDetailPrintDto> orderDetailPrintDtoList, @RequestParam("printerId") Integer printerId);
}